package cn.anc.aonicardv.util;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by yangdai on 2017/6/17.
 */

public class ListUtils {


    public static List<String> subList(List<String> list, int startIndex, int endIndex) {
        if (startIndex < 0 || endIndex <= 0 || startIndex > list.size() - 1 || endIndex > list.size()-1)
            return null;
        List<String> temp = new ArrayList<>();
        for (int i = startIndex; i <= endIndex; i++) {
            temp.add(list.get(i));
        }
        return temp;
    }
}
